In server environments with numerous users running the same application, non-volatile application data, such as metadata, is often similar in most of such user sessions. However, such application data is not identical thereby necessitating data to be session-local. As a result, duplicative data is stored for the user sessions which results in unnecessarily high memory consumption.
With some conventional server environments, wrappers have been utilized which can act as an interfaces between a caller of the wrapper and code wrapped within the wrapper. In particular, a wrapper can be used as a small size data object that contains a reference to data that is used by many sessions (cross-session data) and a reference to data that is only used for a particular session associated with the wrapper (session-specific data). If data is organized in a graph in which every data object has a map of multiple references to other data objects, such maps must be copied into the wrappers (based on a requirement that the wrapper reference peer data objects of the same session). Such maps can become lengthy and also result in increased memory consumption. Moreover, if wrappers for a whole graph are created, many of the data objects do not get used and so the wrappers for such data objects also unnecessarily consume memory.